<!--[include file="crpcalendar_user_menu.htm"]-->

<!--[include file="crpcalendar_user_filtermenu.htm"]-->

<div class="crpcalendar-box">
	<h3><!--[$t|pndate_format:"%B %Y"]--></h3>
</div>


<table class="crpcalendar-table" style="table-layout: fixed;">

	<caption>
	<!--[crpcalendar_monthnav date=$date t=$t]-->
	</caption>

	<tr>
	<th>&nbsp;</th>
	<!--[section name=dayHeader loop=$day_of_week_short]-->
	<th><!--[$day_of_week_short[dayHeader]]--></th>
	<!--[/section]-->
	</tr>

	<tr>
		<td style="border-bottom:1px solid #CCC;">
		<!--[crpcalendar_datetime_stamp datetime=$days.1 assign=weektime]-->
		<!--[pnml name="_WEEK" html=1]--> <!--[$weektime+8*86400|pndate_format:"%W"]-->
		<br />
		<a href="<!--[pnmodurl modname="crpCalendar" type="user" func="week_view" t=$weektime+86400]-->">
			<!--[pnimg modname=crpCalendar titleml=true src=$crpcalendar_theme|cat:"/right_arrows.gif" title=_CRPCALENDAR_VIEW_WEEK]-->
		</a>
		</td>
		<!--[foreach from=$daysexpanded item=day name=cell]-->

		<td class="month-cell<!--[if in_array($day,$days)]--> day-on<!--[else]--> day-off-<!--[$crpcalendar_theme]--> <!--[/if]-->">
			<div<!--[if $todayEv|pndate_format:"%Y%m%d" eq $day|pndate_format:"%Y%m%d"]--> class="day-today"<!--[/if]-->>
				<!--[crpcalendar_datetime_stamp datetime=$day assign=daytime]-->
				<a href="<!--[pnmodurl modname="crpCalendar" type="user" func="day_view" t=$daytime]-->"><!--[$day|pndate_format:"%d"]--></a>
			</div>

			<!--[foreach from=$events item=event name=single]-->
			<!--[if $event.start_date|pndate_format:"%Y%m%d" eq $day|pndate_format:"%Y%m%d"]-->
			<div class="vevent">
				<!--[if $event.__CATEGORIES__.Main.__ATTRIBUTES__.Color]--><span  style="background-color:<!--[$event.__CATEGORIES__.Main.__ATTRIBUTES__.Color]-->">&nbsp;</span><!--[/if]-->
				<a href="<!--[pnmodurl modname="crpCalendar" type="user" func="display" eventid=$event.eventid]-->" title="<!--[$event.title]-->">
					<span class="summary"><!--[$event.title|truncate:"48"]--></span>
				</a>
				<span class="dtstart pn-hide"><!--[$event.cr_date]--></span>
				<span class="uid pn-hide"><!--[$event.cr_uid]--></span>
				<span class="category pn-hide"><!--[$event.__CATEGORIES__.Main.display_name.$lang]--></span>
				<abbr class="dtstart pn-hide" title="<!--[$event.start_date|pndate_format:"%Y%m%dT%H%MZ"]-->"></abbr>
				<abbr class="dtend pn-hide" title="<!--[$event.end_date|pndate_format:"%Y%m%dT%H%MZ"]-->"></abbr>
			</div>
			<!--[elseif ($event.start_date|pndate_format:"%Y%m%d" neq $event.end_date|pndate_format:"%Y%m%d") && ($day|pndate_format:"%Y%m%d" >= $event.start_date|pndate_format:"%Y%m%d") && ($day|pndate_format:"%Y%m%d" <= $event.end_date|pndate_format:"%Y%m%d")]-->
			<div class="vevent">
				<!--[if $event.__CATEGORIES__.Main.__ATTRIBUTES__.Color]--><span  style="background-color:<!--[$event.__CATEGORIES__.Main.__ATTRIBUTES__.Color]-->">&nbsp;</span><!--[/if]-->
				<a href="<!--[pnmodurl modname="crpCalendar" type="user" func="display" eventid=$event.eventid]-->" title="<!--[$event.title]-->">
					<span class="summary"><!--[$event.title|truncate:"48"]--></span>
				</a>
				<span class="dtstart pn-hide"><!--[$event.cr_date]--></span>
				<span class="uid pn-hide"><!--[$event.cr_uid]--></span>
				<span class="category pn-hide"><!--[$event.__CATEGORIES__.Main.display_name.$lang]--></span>
				<abbr class="dtstart pn-hide" title="<!--[$event.start_date|pndate_format:"%Y%m%dT%H%MZ"]-->"></abbr>
				<abbr class="dtend pn-hide" title="<!--[$event.end_date|pndate_format:"%Y%m%dT%H%MZ"]-->"></abbr>
			</div>
			<!--[/if]-->
			<!--[/foreach]-->

		</td>

		<!--[assign var=point value=$smarty.foreach.cell.index+1]-->
		<!--[if $point % 7 == 0]-->
	</tr>
	<tr>
		<!--[if !$smarty.foreach.cell.last]-->
			<td style="border-bottom:1px solid #CCC;">
				<!--[crpcalendar_datetime_stamp datetime=$daysexpanded.$point assign=weektime]-->
				<!--[pnml name="_WEEK" html=1]--> <!--[$weektime+8*86400|pndate_format:"%W"]-->
				<br />
				<a href="<!--[pnmodurl modname="crpCalendar" type="user" func="week_view" t=$weektime+86400]-->">
					<!--[pnimg modname=crpCalendar titleml=true src=$crpcalendar_theme|cat:"/right_arrows.gif" title=_CRPCALENDAR_VIEW_WEEK]-->
				</a>
			</td>
		<!--[else]-->
		<td colspan="8"></td>
		<!--[/if]-->
		<!--[/if]-->

		<!--[/foreach]-->
	</tr>

</table>